home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-01-04 | 1.8 KB | 77 lines | [TEXT/PJMM] |
- {****************************************************}
- {}
- { CShBestPlayDirector.p }
- {}
- { DLOGDirector class for the director which gets the name of a best player. }
- {}
- {****************************************************}
-
-
- unit CShBestPlayDirector;
-
- interface
-
- uses
- TCL, ShIntf;
-
- implementation
-
- const
- VuIDName = 2;
- VuIDPicture = 3;
-
- {****************************************************}
- {}
- { IShBestPlayDirector }
- {}
- { Construct the director and dialog. }
- {}
- {****************************************************}
-
- procedure CShBestPlayDirector.IShBestPlayDirector (aSupervisor: CShGameDirector);
-
- begin { IBestPlayDirector }
- IDLOGDirector(DLOGNewBest, aSupervisor);
-
- if gSystem.hasColorQD then begin
- CPicture(FindViewByID(VuIDPicture)).UsePICT(PICTNewBestPlayerColour);
- end { if }
- else begin
- CPicture(FindViewByID(VuIDPicture)).UsePICT(PICTNewBestPlayerBW);
- end; { else }
- end; { IBestPlayDirector }
-
-
- {****************************************************}
- {}
- { GetPlayerName }
- {}
- { Use a modal dialog to get the name of the best player. }
- {}
- {****************************************************}
-
- procedure CShBestPlayDirector.GetPlayerName (var aName: Str15);
-
- var
- theDismissCmd: LongInt;
- theDialogText: CDialogText;
- theNameStr: Str255;
-
- begin { GetPlayerName }
- BeginDialog;
-
- { Play the new best player sound. }
- SATSoundPlay(gSoundNewBestPlayer, 9, TRUE);
- SATSoundEvents;
-
- theDismissCmd := DoModalDialog(cmdOK);
-
- { Ignore the dismiss command. }
-
- theDialogText := CDialogText(FindViewByID(VuIDName));
- theDialogText.GetTextString(theNameStr);
- aName := Copy(theNameStr, 1, 15);
- end; { GetPlayerName }
-
-
- end. { CShBestPlayDirector }